function changeTab(selectClassName,unSelectClassName,key,content,preIndex){
	this.selectClassNameArr=new Array();
	this.unSelectClassNameArr=new Array();
	if(typeof(preIndex)!='number') this.preIndex=0;
	else this.preIndex=preIndex;
	this.change=function(index){
		var preKey=document.getElementById(key+this.preIndex);
		var preContent=document.getElementById(content+this.preIndex);
		var curKey=document.getElementById(key+index);
		var curContent=document.getElementById(content+index);
		if(preKey){			
			if(!this.unSelectClassNameArr[this.preIndex]){
				preKey.className=unSelectClassName;
			}
			else{
				preKey.className=this.unSelectClassNameArr[this.preIndex];
			}
		//alert(preKey.id);
		}
		if(!this.selectClassNameArr[index]){
				curKey.className=selectClassName;
		}
		else{
			curKey.className=this.selectClassNameArr[index];
		}		
		if(preContent){
			preContent.style.display='none';
		}
		curContent.style.display='';
		this.preIndex=index;
	};
	this.putClassName=function(selectClassName,unSelectClassName,index){
		this.selectClassNameArr[index]=selectClassName;
		this.unSelectClassNameArr[index]=unSelectClassName;
	};
}
var o1=new changeTab('selec','','searchBtn_','searchDiv_',1);
//下面是搜索框里面的文字点击消失显示效果
function sch_txt1(thisname,b){
if(thisname.value==b){
thisname.value="";
}
}
function sch_txt2(thisname,b){
if(thisname.value==""){
thisname.value=b;
}
}

//下面是公交搜索切换效果
function switchBusSearch(id){
	document.getElementById('divBus1').style.display='none';
	document.getElementById('divBus2').style.display='none';	
	document.getElementById('divBus3').style.display='none';	
	document.getElementById('divBus'+id).style.display='';	
}
function writeFlash(flashURL,flashWIDTH,flashHEIGHT){
	document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>'); 
	document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">'); 
	document.writeln ('<PARAM NAME=wmode VALUE=transparent>'); 
	document.writeln ('<PARAM NAME=loop VALUE=true>'); 
	document.writeln ('<PARAM NAME=quality VALUE=high>'); 
	document.writeln ('<PARAM NAME=menu VALUE=false>'); 
	document.writeln ('<EMBED src="'+flashURL+'" wmode="transparent" loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'); 
	document.writeln ('</OBJECT>');
}

